package com.common;

import java.io.Serializable;

/**
 * 前端 ajax请求统一返回结果类型
 * @author guanghong.ji
 * @date   2018年6月8日
 */
public class CommonResult {
		
		/**
		 * true  成功 <br>
		 * false 失败
		 */
		private boolean success=true;
		/**
		 * 提示信息
		 */
		private String message;
		/**
		 * 返回给前端的业务数据
		 */
		private Object data;
		
		
		public boolean isSuccess() {
			return success;
		}
		public void setSuccess(boolean success) {
			this.success = success;
		}
		public String getMessage() {
			return message;
		}
		public void setMessage(String message) {
			this.message = message;
		}
		public Object getData() {
			return data;
		}
		public void setData(Object data) {
			this.data = data;
		}

		public CommonResult() {
			super();
		}
		
		/**
		 * @param data
		 */
		public CommonResult(Object data) {
			super();
			this.data = data;
			
		}
		
		public CommonResult(boolean success, String message){
			super();
			this.success = success;
			this.message = message;
		}
		
		/**
		 * @param success
		 * @param message
		 * @param data
		 */
		public CommonResult(boolean success, String message, Object data) {
			super();
			this.success = success;
			this.message = message;
			this.data = data;
			
		}
}
